export function commonHooks () {
    const calcBaseFontsize = () => {
        const baseWidth = 1920
        const baseFontsize = 16
        let userScreenWidth = window.innerWidth
        let scale = window.innerWidth / baseWidth
        let newBaseFontsize
        if(userScreenWidth > 768) {
            newBaseFontsize = `${ baseFontsize * scale }px` 
            document.documentElement.style.fontSize = newBaseFontsize
            
        } else {
            document.documentElement.style.fontSize = '16px'
        }
    }
    return {
        calcBaseFontsize
    }
}